#ifndef __MY_LEVEL_HPP__
#define __MY_LEVEL_HPP__

#include <iostream>

namespace logs
{
    /*
        日志级别类
        实现功能：
            1.返回日志级别对应的日志字符串
    */
    class LogLevel
    {
    public:
        enum class value
        {
            UNKNOW=0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF
        };

        /*将对应的日志级别的字符串返回*/
        static const char* tostring(value vl)
        {
            switch(vl)
            {
                case value::DEBUG: return "DEBUG";
                case value::INFO: return "INFO";
                case value::WARN: return "WARN";
                case value::ERROR: return "ERROR";
                case value::FATAL: return "FATAL";
                case value::OFF: return "OFF";
            }
            return "UNKNOW";
        }
    };
}

#endif